﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Microsoft.Web.Mvc;
using Project.Resource.User;


namespace Project.WebUI.Models
{
    public class UserRegisteModel
    {
        [Required(ErrorMessageResourceName = "UserName", ErrorMessageResourceType = typeof(RegisterResource))]
        public string UserName { get; set; }

        [DataType(DataType.Password)]
        [Required(ErrorMessageResourceName = "Password", ErrorMessageResourceType = typeof(RegisterResource))]
        [StringLength(100, ErrorMessageResourceName = "MissPassword", ErrorMessageResourceType = typeof(RegisterResource), MinimumLength = 6)]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Required(ErrorMessageResourceName = "ConfirmPassword", ErrorMessageResourceType = typeof(RegisterResource))]
        [Compare("Password", ErrorMessageResourceName = "MissMatchPassword", ErrorMessageResourceType = typeof(RegisterResource))]
        public string RePassword { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Phone { get; set; }
        public string Address { get; set; }
        public string Country { get; set; }
        public string Sex { get; set; }
        public string Birthday { get; set; }
        [Required(ErrorMessageResourceName = "LrAccount", ErrorMessageResourceType = typeof(RegisterResource))]
        public string LrAccount { get; set; }

        [Required(ErrorMessageResourceName = "Email",ErrorMessageResourceType=typeof(RegisterResource))]
        [Email]
        public string Email { get; set; }
    }

    public class LogOnModel
    {
        public decimal Balance { get; set; }
        [Required(ErrorMessageResourceName = "UserName", ErrorMessageResourceType = typeof(RegisterResource))]
        public string UserName { get; set; }

        [Required(ErrorMessageResourceName = "Password", ErrorMessageResourceType = typeof(RegisterResource))]
        public string Password { get; set; }
    }

    public class ChangePasswordModel
    {        
        [Required(ErrorMessageResourceName = "CurrentPassword", ErrorMessageResourceType = typeof(RegisterResource))]        
        [DataType(DataType.Password)]
        public string  CurrentPassword { get; set; }

        [StringLength(100, ErrorMessageResourceName = "MissPassword", ErrorMessageResourceType = typeof(RegisterResource), MinimumLength = 6)]
        [Required(ErrorMessageResourceName = "Password", ErrorMessageResourceType = typeof(RegisterResource))]
        [DataType(DataType.Password)]
        public string Password { get; set; }

        [Compare("Password", ErrorMessageResourceName = "MissMatchPassword", ErrorMessageResourceType = typeof(RegisterResource))]
        [Required(ErrorMessageResourceName = "ConfirmPassword", ErrorMessageResourceType = typeof(RegisterResource))]
        [DataType(DataType.Password)]
        public string ConfirmPassword { get; set; }
    }
    public class DepositModel
    {
        [Required(ErrorMessageResourceName = "AmountRequired", ErrorMessageResourceType = typeof(DepositResource))]
        [Range(0.5d, 10000d, ErrorMessageResourceName = "RangeAmount", ErrorMessageResourceType = typeof(DepositResource))]                
        public decimal lr_amnt { get; set; }
    }

    public class WithdrawModel
    {
        [Required(ErrorMessageResourceName = "AmountRequired", ErrorMessageResourceType = typeof(DepositResource))]
        [Range(1d, 10000d, ErrorMessageResourceName = "RangeAmount", ErrorMessageResourceType = typeof(DepositResource))]
        [Display(Name = "Amount")]
        public decimal lr_amnt { get; set; }
    }

    public class ContactModel
    {        
        [Required(ErrorMessage=" ")]        
        public string Body { get; set; }

        [Required(ErrorMessage = " ")]
        [Email]
        public string Email { get; set; }
    }

    public  class ContactInfo
    {
        public string UserName { get; set; }
        public string Balance { get; set; }

    }

    public class UserInfoDTO
    {
        public string UserName { get; set; }
        public string LrAccount { get; set; }
        public string Email { get; set; }
        [Required(ErrorMessage="Test")]
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Address { get; set; }
        public string Phone { get; set; }
        public int CountryId { get; set; }
        public string Birthday { get; set; }
    }
    public class Forgot
    {
        [Required(ErrorMessageResourceName = "UserName", ErrorMessageResourceType = typeof(RegisterResource))]
        public string UserName { get; set; }
        [Required(ErrorMessageResourceName = "Email", ErrorMessageResourceType = typeof(RegisterResource))]
        [Email]
        public string Email { get; set; }
    }

}